package com.zhengqing.softdemo.keygen

import com.mybatisflex.core.keygen.IKeyGenerator
import java.security.SecureRandom

class HashCodeKeyGenerator : IKeyGenerator {
    override fun generate(entity: Any, keyColumn: String): Any {
        return entity.hashCode() + SecureRandom().nextInt()
    }
}